﻿// See https://aka.ms/new-console-template for more information

using System.Collections;

int[] ar = new[] {1, 2, 4, 5, 65, 6, 76, 7, 7, 8};
ArrayList arrayList = new ArrayList(ar);


void hande(ArrayList list)
{
    Int32 max = Int32.MinValue;
    Int32 min = Int32.MaxValue;
    float average = 0;
    Int32 sum = 0;
    
    foreach (Int32 i in list)
    {
        if (i > max)
        {
            max = i;
        }

        if (i < min)
        {
            min = i;
        }

        sum += i;
    }

    average = sum/ list.Count;
    
    Console.WriteLine(max);    
    Console.WriteLine(min);
    Console.WriteLine(average);
    Console.WriteLine(sum);
    
}

hande(arrayList);
